<% HttpSession httpSession = request.getSession();
   Employee employee = (Employee)session.getAttribute("user");
   if(employee == null || employee.getRole()== null){
   	response.sendRedirect("errorLogin.jsp");
   }
%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.msti.entity.Course"%>
<%@page import="java.util.Iterator"%>
<%@page import="com.msti.entity.Employee"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Edit Courses</title>
</head>
<body>
<form action = "editCourses.do" method = "post">
<a href="logout.do">logout</a><br/>
Select Course To Edit :<select name="courseId">
<%
		List<Course> courses = new ArrayList<Course>();
		courses = (ArrayList<Course>)request.getAttribute("courses");
		if(courses != null){
		Iterator<Course> iterator = courses.iterator();
		while(iterator.hasNext()){
			Course c = iterator.next();
	%>
	<option><%=c.getName() %></option>
	
<%} }%>
</select>
<input type="submit" value="Edit"/>
</form>
</body>
</html>